package edu.spec.student.dao.impl;

import edu.spec.student.dao.iface.ICourseDao;
import edu.spec.student.model.Course;
import org.madgecko.basic.dao.BaseDao;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by MadFrog on 2017/10/13.
 */
@Repository
public class CourseDao extends BaseDao<Course> implements ICourseDao{

    @Override
    public List<Course> listCourseByTeacher(Integer id) {
        String hql = "from Course c where c.teacher.id=" + id;
        return this.list(hql);
    }

}
